//package com.example.demo.controller;
//
//import com.example.demo.model.Dish;
//import com.example.demo.service.DishService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("/api")
//public class DishController {
//
//    @Autowired
//    private DishService dishService;
//
//    @GetMapping("/category")
//    public List<Dish> getAllDishes() {
//        return dishService.getAllDishes();
//    }
//
//    @GetMapping("/categories")
//    public List<Dish> getDishesByCategory(@RequestParam int category_id, @RequestParam String sort) {
//        return dishService.getDishesByCategory(category_id, sort);
//    }
//
//    @GetMapping("/dishes/{dish_id}")
//    public Dish getDishById(@PathVariable int dish_id) {
//        return dishService.getDishById(dish_id);
//    }
//
//    @GetMapping("/recommendations/history")
//    public List<Dish> getRecommendations() {
//        return dishService.getRecommendations();
//    }
//}